using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace Autobot
{
    class Popup
    {
        // Thanks to the guy who wrote this article:
        // http://www.riemers.net/eng/Tutorials/XNA/Csharp/ShortTuts/XNA_messagebox.php
        // It explained how to execute the MessageBox routine since XNA doesn't support it
        // This simple class was designed by me

        // External reference to use the windows message box
        [DllImport("user32.dll", CharSet = CharSet.Auto)]
        public static extern uint MessageBox(IntPtr hWnd, String text, String caption, uint Type);

        // Show a message box with the contents of the passed argument
        public static uint Show(String message)
        {
            return MessageBox(new IntPtr(0), message, "Message from the Doctor!", 0);
        }

        // Show a message box with the contents and caption of the passed arguments
        public static uint Show(String message, String caption)
        {
            return MessageBox(new IntPtr(0), message, caption, 0);
        }
    }
}
